.class Lcom/instagram/android/s/b/d;
.super Ljava/lang/Object;
.source "SurveyToolHelper.java"

# interfaces
.implements Landroid/widget/AdapterView$OnItemClickListener;


# instance fields
.field final synthetic a:Landroid/widget/ImageView;

.field final synthetic b:Landroid/widget/ViewSwitcher;

.field final synthetic c:Lcom/instagram/android/s/c/a;

.field final synthetic d:Lcom/instagram/android/s/b/a;


# direct methods
.method constructor <init>(Lcom/instagram/android/s/b/a;Landroid/widget/ImageView;Landroid/widget/ViewSwitcher;Lcom/instagram/android/s/c/a;)V
    .locals 0
    .parameter
    .parameter
    .parameter
    .parameter

    .prologue
    .line 152
    iput-object p1, p0, Lcom/instagram/android/s/b/d;->d:Lcom/instagram/android/s/b/a;

    iput-object p2, p0, Lcom/instagram/android/s/b/d;->a:Landroid/widget/ImageView;

    iput-object p3, p0, Lcom/instagram/android/s/b/d;->b:Landroid/widget/ViewSwitcher;

    iput-object p4, p0, Lcom/instagram/android/s/b/d;->c:Lcom/instagram/android/s/c/a;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onItemClick(Landroid/widget/AdapterView;Landroid/view/View;IJ)V
    .locals 5
    .parameter
    .parameter "view"
    .parameter "position"
    .parameter "id"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/widget/AdapterView",
            "<*>;",
            "Landroid/view/View;",
            "IJ)V"
        }
    .end annotation

    .prologue
    .line 155
    .local p1, parent:Landroid/widget/AdapterView;,"Landroid/widget/AdapterView<*>;"
    iget-object v0, p0, Lcom/instagram/android/s/b/d;->d:Lcom/instagram/android/s/b/a;

    invoke-static {v0}, Lcom/instagram/android/s/b/a;->b(Lcom/instagram/android/s/b/a;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 156
    invoke-virtual {p1, p3}, Landroid/widget/AdapterView;->getItemAtPosition(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/instagram/android/s/c/b;

    .line 158
    iget-object v1, p0, Lcom/instagram/android/s/b/d;->a:Landroid/widget/ImageView;

    iget-object v2, p0, Lcom/instagram/android/s/b/d;->d:Lcom/instagram/android/s/b/a;

    invoke-static {v2}, Lcom/instagram/android/s/b/a;->c(Lcom/instagram/android/s/b/a;)Landroid/app/Activity;

    move-result-object v2

    invoke-virtual {v0}, Lcom/instagram/android/s/c/b;->c()Ljava/lang/String;

    move-result-object v3

    invoke-static {v2, v3}, Lcom/instagram/android/s/b/a;->a(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/drawable/Drawable;

    move-result-object v2

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 159
    iget-object v1, p0, Lcom/instagram/android/s/b/d;->b:Landroid/widget/ViewSwitcher;

    invoke-virtual {v1}, Landroid/widget/ViewSwitcher;->showNext()V

    .line 160
    iget-object v1, p0, Lcom/instagram/android/s/b/d;->c:Lcom/instagram/android/s/c/a;

    invoke-virtual {v1}, Lcom/instagram/android/s/c/a;->f()Lcom/instagram/android/s/c/c;

    move-result-object v1

    sget-object v2, Lcom/instagram/android/s/c/c;->a:Lcom/instagram/android/s/c/c;

    if-ne v1, v2, :cond_2

    .line 161
    invoke-static {}, Lcom/instagram/b/a;->a()Lcom/instagram/b/c;

    move-result-object v1

    new-instance v2, Lcom/instagram/b/b;

    const-string v3, "user_sentiment_survey"

    iget-object v4, p0, Lcom/instagram/android/s/b/d;->d:Lcom/instagram/android/s/b/a;

    invoke-static {v4}, Lcom/instagram/android/s/b/a;->d(Lcom/instagram/android/s/b/a;)Lcom/instagram/b/d;

    move-result-object v4

    invoke-direct {v2, v3, v4}, Lcom/instagram/b/b;-><init>(Ljava/lang/String;Lcom/instagram/b/d;)V

    const-string v3, "survey_id"

    iget-object v4, p0, Lcom/instagram/android/s/b/d;->c:Lcom/instagram/android/s/c/a;

    invoke-virtual {v4}, Lcom/instagram/android/s/c/a;->b()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v2, v3, v4}, Lcom/instagram/b/b;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/instagram/b/b;

    move-result-object v2

    const-string v3, "selected_survey_answer"

    invoke-virtual {v0}, Lcom/instagram/android/s/c/b;->a()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v2, v3, v0}, Lcom/instagram/b/b;->a(Ljava/lang/String;Ljava/lang/String;)Lcom/instagram/b/b;

    move-result-object v0

    invoke-interface {v1, v0}, Lcom/instagram/b/c;->a(Lcom/instagram/b/b;)V

    .line 169
    :cond_0
    :goto_0
    iget-object v0, p0, Lcom/instagram/android/s/b/d;->d:Lcom/instagram/android/s/b/a;

    invoke-static {v0}, Lcom/instagram/android/s/b/a;->e(Lcom/instagram/android/s/b/a;)Landroid/os/Handler;

    move-result-object v0

    const/4 v1, 0x0

    const-wide/16 v2, 0x7d0

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z

    .line 171
    :cond_1
    return-void

    .line 166
    :cond_2
    iget-object v1, p0, Lcom/instagram/android/s/b/d;->c:Lcom/instagram/android/s/c/a;

    invoke-virtual {v1}, Lcom/instagram/android/s/c/a;->f()Lcom/instagram/android/s/c/c;

    move-result-object v1

    sget-object v2, Lcom/instagram/android/s/c/c;->b:Lcom/instagram/android/s/c/c;

    if-ne v1, v2, :cond_0

    .line 167
    iget-object v1, p0, Lcom/instagram/android/s/b/d;->c:Lcom/instagram/android/s/c/a;

    iget-object v2, p0, Lcom/instagram/android/s/b/d;->d:Lcom/instagram/android/s/b/a;

    invoke-static {v2}, Lcom/instagram/android/s/b/a;->d(Lcom/instagram/android/s/b/a;)Lcom/instagram/b/d;

    move-result-object v2

    invoke-static {v1, v0, v2}, Lcom/instagram/android/feed/f/k;->a(Lcom/instagram/android/s/c/a;Lcom/instagram/android/s/c/b;Lcom/instagram/b/d;)V

    goto :goto_0
.end method
